//
//  CacheHelper.h
//  HdStore
//
//  Created by zhenqiu on 15/11/23.
//  Copyright (c) 2015年 zhenqiu. All rights reserved.
//

#import <Foundation/Foundation.h>

// define keys

#define PUSH_CODE_KEY @"com.haodai.finacialstore.pushcode"
#define USER_ID_KEY @"com.haodai.financialstore.userid"
#define USER_AVATAR_KEY @"com.haodai.financialstore.user.avatar"
#define USER_PHONE_KEY @"com.haodai.financialstore.user.phone"

#define CITY_INFO_KEY @"com.haodai.financialstore.cityinfo"
#define CITY_INFO_LIST_KEY @"com.haodai.financialstore.cityinfo.list"
#define USER_SERVER_INPUT_INFO @"com.haodai.financialstore.input.info"
#define USER_LOCAL_INPUT_INFO @"com.haodai.financialstore.local.input.info"
#define USER_LOAN_STEP_ORDER_ID @"com.haodai.financialstore.step.order.id"
#define HOME_CREDIT_CARD_LIST_INFO @"com.haodai.home.credit.card.list.info"
#define HOME_CREDIT_CARD_HOTLIST_INFO @"com.haodai.home.credit.card.hotlist.info"
#define HOME_CREDIT_CARD_BANKLIST_INFO @"com.haodai.home.credit.card.banklist.info"
#define HOME_CREDIT_CARD_THEMELIST_INFO @"com.haodai.home.credit.card.themelist.info"
#define HOME_CREDIT_CARD_RANKLIST_INFO @"com.haodai.home.credit.card.ranklist.info"
#define CREDIT_PERSONAL_INFORMATION_INFO @"com.haodai.credit.personal.information.info"
#define CREDIT_CONSUMER_INFORMATION_INFO @"com.haodai.credit.consumer.information.info"
#define CREDIT_PICTURE_MATERIAL_INFO @"com.haodai.credit.picture.material.info"
#define CREDIT_CREDIT_SCORE_INFO @"com.haodai.credit.credit.score.info"
#define ME_CREDIT_CARD_APPLY_RECORD_INFO @"com.haodai.me.credit.card.apply.record.info"
#define ME_LOAN_MYLOAN_INFO @"com.haodai.me.loan.myloan.info"

//bill
#define ME_MAIN_BILL_TIP_INFO @"com.haodai.me.main.bill.tip.info"
#define ME_BILL_CREDIT_CARD_MYLIST_INFO @"com.haodai.me.bill.credit.card.mylist.info"
#define ME_BILL_DETAIL_HAND_INFO @"com.haodai.me.bill.detail.hand.info"
#define ME_BILL_DETAIL_SPIDER_INFO @"com.haodai.me.bill.detail.spider.info"
#define ME_BILL_LIST_SPIDER_PAST_INFO @"com.haodai.me.bill.list.spider.past.info"
#define ME_BILL_EMAIL_LIST @"com.haodai.me.bill.email.info"
#define ME_BILL_BANK_LIST @"com.haodai.me.bill.bank.info"

@interface CacheHelper : NSObject
{
    
    NSString * username ;
    NSString * passward ;
    
}

@property(nonatomic,strong) NSString * username ;
@property(nonatomic,strong) NSString * passward ;
@property (nonatomic, strong) NSString *authdid,*authkey;//leon changed

+(id) getInstance;


// base cache
-(void)setCacheValue:(id)value forKey:(NSString *)key;
-(id)getCacheValue:(NSString *)key;


-(id)getUserId;
-(void)cacheUserId:(id) userid;

-(id)getCityInfo;
-(void)cacheCityInfo:(id) cityInfo;

-(id)getPhoneNumber;
-(void)cachePhoneNumber:(id)phoneNumber;

-(id)getUserAvatar;
-(void)cacheUserAvatar:(id)avatarUrl;

-(void)cacheUserInputInfo:(id)dic withKey:(NSString*)key;

-(void)exit;

@end
